#pragma once

#include <bitset>

class FloatConverter
{
public:
    FloatConverter(){};
    ~FloatConverter(){};

    std::bitset<32> convert1750AFloatToIEEEFloat(unsigned long bytes);
    std::bitset<32> convertIEEEFloatTo1750AFloat(unsigned long bytes);

	std::bitset<32> convertIEEEFloatToDecFloat(unsigned long bytes);
	std::bitset<32> convertDecFloatToIEEEFloat(unsigned long bytes);

    unsigned long getIEEEFloatBytesFrom1750AFloat(unsigned long bytes1750AFloat);
	unsigned long getIEEEFloatBytesFromDecFloat(unsigned long bytesDecFloat);
	unsigned long get1750AFloatBytesFromIEEEFloat(unsigned long bytesIEEEFloat);
	unsigned long geDecFloatBytesFromIEEEFloat(unsigned long bytesIEEEFloat);

    std::string get1750AFloatStringFromIEEEFloat(unsigned long bytesIEEEFloat);
    std::string getIEEEFloatStringFrom1750AFloat(unsigned long bytes1750Float);
    std::string getIEEEFloatString(float f);
    std::string getIEEEFloatHexString(float f);
    std::string get1750AFloatString(unsigned long);

private:

    // copy constructor and assignment operator not implemented
    FloatConverter(const FloatConverter& rhs);
    FloatConverter& operator=(const FloatConverter& rhs);

	template<int bits>
	void assign( std::bitset<bits>& lhs, const std::bitset<bits>& rhs );
};
